import DashboardLayout from "@/layout/dashboard/DashboardLayout.vue";
// GeneralViews
import NotFound from "@/pages/NotFoundPage.vue";
import UserLoginView from "@/pages/UserLoginView.vue";
import AdministrativeDivisionsView from "@/pages/AdministrativeDivisionsView.vue";
import DeviceManagementView from "@/pages/DeviceManagementView.vue";
import DeviceTypeManagementView from "@/pages/DeviceTypeManagementView.vue";
import IndustryManagementView from "@/pages/IndustryManagementView.vue";
import ProductManagementView from "@/pages/ProductManagementView.vue";
import TenantReviewView from "@/pages/TenantReviewView.vue";
import TenantManageView from "@/pages/TenantManageView.vue";

// Admin pages


const routes = [
  {
    path: '/',
    name: 'UserLoginView',
    component: UserLoginView
  },
  {
    path: "/dashboardLayout",
    component: DashboardLayout,
    // redirect: "/dashboard",
    children: [
      {
        path: '/administrativeDivisionsView',
        name: 'AdministrativeDivisionsView',
        component: AdministrativeDivisionsView
      },
      {
        path: '/deviceManagementView',
        name: 'DeviceManagementView',
        component: DeviceManagementView
      },
      {
        path: '/deviceTypeManagementView',
        name: 'DeviceTypeManagementView',
        component: DeviceTypeManagementView
      },
      {
        path: '/industryManagementView',
        name: 'IndustryManagementView',
        component: IndustryManagementView
      },
      {
        path: '/productManagementView',
        name: 'ProductManagementView',
        component: ProductManagementView
      },
      {
        path: '/tenantReviewView',
        name: 'TenantReviewView',
        component: TenantReviewView
      },
      {
        path: '/tenantManageView',
        name: 'TenantManageView',
        component: TenantManageView
      }
    ]
  },
  { path: "*", component: NotFound },
];

/**
 * Asynchronously load view (Webpack Lazy loading compatible)
 * The specified component must be inside the Views folder
 * @param  {string} name  the filename (basename) of the view to load.
function view(name) {
   var res= require('../components/Dashboard/Views/' + name + '.vue');
   return res;
};**/

export default routes;
